/*
 * Sesame Inc.
 * Copyright (c) 2009 All Rights Reserved.
 */
package com.sesame.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.transaction.annotation.Transactional;

import com.sesame.domain.Admin;
import com.sesame.domain.AdminLog;
import com.sesame.domain.Complaint;
import com.sesame.domain.Notice;
import com.sesame.domain.User;

/**
 * @author voidman
 * 
 */
@Transactional
public interface AdminService {
    @Transactional(readOnly = true)
    public boolean isLogin(HttpServletRequest request, String userName,
            String password, Map model);

    @Transactional(readOnly = true)
    public boolean validatePassword(Admin admin, String confirmPassword,
            Map model);

    public boolean isNewAdmin(Admin admin, Map model);

    @Transactional(readOnly = true)
    public List<Admin> listAllAdmin();

    public void deleteAdmin(Integer id);

    public void resetPassword(Integer id);

    @Transactional(readOnly = true)
    public List<Notice> listAllNotice();

    public boolean isNewNotice(Notice notice, Map model);

    public void deleteNotice(Integer id);

    @Transactional(readOnly = true)
    public Notice showNotice(Integer id);

    public boolean isEditNotice(Notice notice, Map model);

    @Transactional(readOnly = true)
    public List<Complaint> listAllComplaint();

    public void deleteComplaint(Integer id);

    public void editComplaintNote(Integer id, String note);

    public void dealComplaint(Integer id, String state);

    public boolean modifyPassword(String oldPassword, Admin admin, Map model);

    @Transactional(readOnly = true)
    public List<AdminLog> listAllAdminLog();

    @Transactional(readOnly = true)
    public List<User> listAllUser();

    public void deleteUser(Integer id);

}